.photo-detail {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000;
  color: white;
}

.photo-detail.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

/* 工具栏样式 */
.photo-detail .toolbar {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.photo-detail .toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.photo-detail .photo-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.photo-detail .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-detail .btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-detail .btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.photo-detail .btn.danger {
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
}

.photo-detail .btn.danger:hover {
  background-color: rgba(220, 53, 69, 0.3);
}

/* 内容区域 */
.photo-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 照片查看器 */
.photo-viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.photo-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.photo-detail.fullscreen .photo-image {
  cursor: zoom-out;
}

/* 全屏控制 */
.fullscreen-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.fullscreen-controls .btn {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

/* 元数据面板 */
.metadata-panel {
  width: 350px;
  background-color: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  flex-shrink: 0;
}

.metadata-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metadata-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: white;
}

.metadata-header .btn.small {
  padding: 4px 8px;
  font-size: 12px;
  min-width: auto;
}

.metadata-content {
  padding: 20px;
}

.metadata-section {
  margin-bottom: 24px;
}

.metadata-section:last-child {
  margin-bottom: 0;
}

.metadata-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metadata-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metadata-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.metadata-item .label {
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
  min-width: 80px;
}

.metadata-item .value {
  font-size: 13px;
  color: white;
  text-align: right;
  word-break: break-word;
  flex: 1;
}

/* 加载状态 */
.photo-detail.loading {
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.photo-detail.loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.photo-detail.loading p {
  font-size: 16px;
  color: #ccc;
  margin: 0;
}

/* 错误状态 */
.photo-detail.error {
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.error-content {
  text-align: center;
  padding: 40px;
}

.error-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: white;
}

.error-content p {
  font-size: 16px;
  color: #ccc;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.error-content .btn {
  background-color: #007AFF;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.error-content .btn:hover {
  background-color: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .photo-detail .toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    min-height: auto;
  }
  
  .photo-detail .toolbar-left,
  .photo-detail .toolbar-right {
    width: 100%;
    justify-content: center;
  }
  
  .photo-detail .photo-title {
    max-width: none;
    text-align: center;
  }
  
  .photo-content {
    flex-direction: column;
  }
  
  .metadata-panel {
    width: 100%;
    max-height: 40vh;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .metadata-content {
    padding: 16px;
  }
  
  .metadata-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .metadata-item .value {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .photo-detail .toolbar-right {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .photo-detail .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .fullscreen-controls {
    top: 10px;
    right: 10px;
  }
}

/* 动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 滚动条样式 */
.metadata-panel::-webkit-scrollbar {
  width: 6px;
}

.metadata-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.metadata-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.metadata-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}